Optimal. Leaf size=111 \[ -\frac {\text {ArcTan}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{a d^{3/2} f}+\frac {\text {ArcTan}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {2} a d^{3/2} f}-\frac {2}{a d f \sqrt {d \tan (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.27, antiderivative size = 111, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3650, 3734,
3613, 211, 3715, 65} \begin {gather*} -\frac {\text {ArcTan}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{a d^{3/2} f}+\frac {\text {ArcTan}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {2} a d^{3/2} f}-\frac {2}{a d f \sqrt {d \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 211
Rule 3613
Rule 3650
Rule 3715
Rule 3734
Rubi steps
\begin {align*} \int \frac {1}{(d \tan (e+f x))^{3/2} (a+a \tan (e+f x))} \, dx &=-\frac {2}{a d f \sqrt {d \tan (e+f x)}}-\frac {2 \int \frac {\frac {a d^2}{2}+\frac {1}{2} a d^2 \tan (e+f x)+\frac {1}{2} a d^2 \tan ^2(e+f x)}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))} \, dx}{a d^3}\\ &=-\frac {2}{a d f \sqrt {d \tan (e+f x)}}-\frac {\int \frac {\frac {a^2 d^2}{2}+\frac {1}{2} a^2 d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx}{a^3 d^3}-\frac {\int \frac {1+\tan ^2(e+f x)}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))} \, dx}{2 d}\\ &=-\frac {2}{a d f \sqrt {d \tan (e+f x)}}-\frac {\text {Subst}\left (\int \frac {1}{\sqrt {d x} (a+a x)} \, dx,x,\tan (e+f x)\right )}{2 d f}+\frac {(a d) \text {Subst}\left (\int \frac {1}{\frac {a^4 d^4}{2}+d x^2} \, dx,x,\frac {\frac {a^2 d^2}{2}-\frac {1}{2} a^2 d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}}\right )}{2 f}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {2} a d^{3/2} f}-\frac {2}{a d f \sqrt {d \tan (e+f x)}}-\frac {\text {Subst}\left (\int \frac {1}{a+\frac {a x^2}{d}} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{d^2 f}\\ &=-\frac {\tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{a d^{3/2} f}+\frac {\tan ^{-1}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {2} a d^{3/2} f}-\frac {2}{a d f \sqrt {d \tan (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.78, size = 122, normalized size = 1.10 \begin {gather*} -\frac {4-\sqrt {2} \text {ArcTan}\left (1-\sqrt {2} \sqrt {\tan (e+f x)}\right ) \sqrt {\tan (e+f x)}+\sqrt {2} \text {ArcTan}\left (1+\sqrt {2} \sqrt {\tan (e+f x)}\right ) \sqrt {\tan (e+f x)}+2 \text {ArcTan}\left (\sqrt {\tan (e+f x)}\right ) \sqrt {\tan (e+f x)}}{2 a d f \sqrt {d \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(318\) vs.
\(2(93)=186\).
time = 0.17, size = 319, normalized size = 2.87
method | result | size |
derivativedivides | \(\frac {2 d^{2} \left (-\frac {1}{d^{3} \sqrt {d \tan \left (f x +e \right )}}-\frac {\arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {d}}\right )}{2 d^{\frac {7}{2}}}+\frac {-\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}}{2 d^{3}}\right )}{f a}\) | \(319\) |
default | \(\frac {2 d^{2} \left (-\frac {1}{d^{3} \sqrt {d \tan \left (f x +e \right )}}-\frac {\arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {d}}\right )}{2 d^{\frac {7}{2}}}+\frac {-\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}}{2 d^{3}}\right )}{f a}\) | \(319\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 128, normalized size = 1.15 \begin {gather*} -\frac {\frac {\frac {\sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}}}{a} + \frac {2 \, \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{a \sqrt {d}} + \frac {4}{\sqrt {d \tan \left (f x + e\right )} a}}{2 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.91, size = 291, normalized size = 2.62 \begin {gather*} \left [-\frac {\sqrt {2} \sqrt {-d} \log \left (\frac {d \tan \left (f x + e\right )^{2} + 2 \, \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {-d} {\left (\tan \left (f x + e\right ) - 1\right )} - 4 \, d \tan \left (f x + e\right ) + d}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right ) + 2 \, \sqrt {-d} \log \left (\frac {d \tan \left (f x + e\right ) + 2 \, \sqrt {d \tan \left (f x + e\right )} \sqrt {-d} - d}{\tan \left (f x + e\right ) + 1}\right ) \tan \left (f x + e\right ) + 8 \, \sqrt {d \tan \left (f x + e\right )}}{4 \, a d^{2} f \tan \left (f x + e\right )}, -\frac {\sqrt {2} \sqrt {d} \arctan \left (\frac {\sqrt {2} \sqrt {d \tan \left (f x + e\right )} {\left (\tan \left (f x + e\right ) - 1\right )}}{2 \, \sqrt {d} \tan \left (f x + e\right )}\right ) \tan \left (f x + e\right ) + 2 \, \sqrt {d} \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right ) \tan \left (f x + e\right ) + 4 \, \sqrt {d \tan \left (f x + e\right )}}{2 \, a d^{2} f \tan \left (f x + e\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {1}{\left (d \tan {\left (e + f x \right )}\right )^{\frac {3}{2}} \tan {\left (e + f x \right )} + \left (d \tan {\left (e + f x \right )}\right )^{\frac {3}{2}}}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 284 vs.
\(2 (98) = 196\).
time = 0.65, size = 284, normalized size = 2.56 \begin {gather*} -\frac {\frac {2 \, \sqrt {2} {\left (d \sqrt {{\left | d \right |}} + {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{a d^{2} f} + \frac {2 \, \sqrt {2} {\left (d \sqrt {{\left | d \right |}} + {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{a d^{2} f} + \frac {8 \, \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{a \sqrt {d} f} + \frac {\sqrt {2} {\left (d \sqrt {{\left | d \right |}} - {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{a d^{2} f} - \frac {\sqrt {2} {\left (d \sqrt {{\left | d \right |}} - {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{a d^{2} f} + \frac {16}{\sqrt {d \tan \left (f x + e\right )} a f}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.44, size = 124, normalized size = 1.12 \begin {gather*} -\frac {2}{a\,d\,f\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}-\frac {\mathrm {atan}\left (\frac {\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )}{a\,d^{3/2}\,f}-\frac {\sqrt {2}\,\left (2\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,\sqrt {d}}\right )+2\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,\sqrt {d}}+\frac {\sqrt {2}\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{2\,d^{3/2}}\right )\right )}{4\,a\,d^{3/2}\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________